<?

class MailHelper {
	 
	public static function sendMail($subject,$from,$to,$body){
		$message = Swift_Message::newInstance()
			 ->setSubject($subject)
			 ->setFrom($from)
			 ->setTo(array($to))
			 ->setBody($body, 'text/html');
		$transport = Swift_MailTransport::newInstance();
		$mailer = Swift_Mailer::newInstance($transport);
		$result = $mailer->send($message);
		return $result;
		
	}
	
}